package com.zhny.aiot.leakage.valve.pressusre4.v2.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class LeakageValve4PressureV2StoreEntry extends StoreEntity {
    @PropertyValue(alias = "电压",description = "电池电压",unit = "V",icon= IconConstract.Voltage,variableType= VariableType.Numerical,actions={
            @ActionValue(name= Operate.Check, commandCode="queryVoltage", eventType= EventType.Click)
    })
    private Double voltage;
    @PropertyValue(alias = "阀门1状态",description = "阀门1开关状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve1",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve1",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean a;
    @PropertyValue(alias = "阀门2状态",description = "阀门2开关状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve2",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve2",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean b;
    @PropertyValue(alias = "阀门3状态",description = "阀门3开关状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve3",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve3",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean c;
    @PropertyValue(alias = "阀门4状态",description = "阀门4开关状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve4",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve4",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean d;
    @PropertyValue(alias = "水流开关1状态",description = "水流1状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryStatus",eventType=EventType.Click)
    })
    private Boolean aWaterFlow;
    @PropertyValue(alias = "水流开关2状态",description = "水流2状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryStatus",eventType=EventType.Click)
    })
    private Boolean bWaterFlow;
    @PropertyValue(alias = "水流开关3状态",description = "水流3状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryStatus",eventType=EventType.Click)
    })
    private Boolean cWaterFlow;
    @PropertyValue(alias = "水流开关4状态",description = "水流4状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check,commandCode="queryStatus",eventType=EventType.Click)
    })
    private Boolean dWaterFlow;

    @PropertyValue(alias = "A通道压力",description = "A过水压力",unit = "mpa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryPressure", eventType=EventType.Click)
    })
    private String aPressure;
    @PropertyValue(alias = "B通道压力",description = "B过水压力",unit = "mpa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryPressure", eventType=EventType.Click)
    })
    private String bPressure;

    @PropertyValue(alias = "C通道压力",description = "C通道压力",unit = "mpa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryPressure", eventType=EventType.Click)
    })
    private String cPressure;
    @PropertyValue(alias = "D通道压力",description = "D通道压力",unit = "mpa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryPressure", eventType=EventType.Click)
    })
    private String dPressure;
    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("voltage=").append(this.voltage);
        sb.append(", valve1status=").append(this.a);
        sb.append(", valve2status=").append(this.b);
        sb.append(", valve3status=").append(this.c);
        sb.append(", valve4status=").append(this.d);
        sb.append(", aPressure=").append(this.aPressure);
        sb.append(", bPressure=").append(this.bPressure);
        sb.append(", cPressure=").append(this.cPressure);
        sb.append(", dPressure=").append(this.dPressure);
        return sb.toString();
    }
}
